<template>
  <!-- 放人类认证模块 -->
  <div v-if="show">
    <div>
      <button @click="reset">重置</button>
      <button>关闭</button>
    </div>
    <div id="captcha"></div>
  </div>
</template>

<script setup>
import "../vendor/longbow.slidercaptcha.min.js"
import '../vendor/slidercaptcha.min.css'
import { ref, onMounted } from "vue"
let captcha = null
const reset = () => {
  captcha.reset()
}
onMounted(() => {
  captcha = sliderCaptcha({
    //这里的id和上面的结构要相对应
    id: "captcha",
    onSuccess () { },
    onerror () { },
    verify () {
      //默认认证行为
      return true
    }
  })
})
</script>

<style lang="scss" scoped>
</style>